package com.service.impl;

import com.bean.Seat;
import com.bean.User;
import com.dao.SeatMapper;
import com.dao.UserMapper;
import com.service.SeatService;
import com.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 座位业务逻辑实现
 */
@Service("seatService")
public class SeatServiceImpl implements SeatService {

    @Autowired
    private SeatMapper seatMapper;

    @Override
    public int save(Seat seat) {
        return seatMapper.insert(seat);
    }

    @Override
    public int remove(Seat seat) {
        return seatMapper.delete(seat);
    }

    @Override
    public int modify(Seat seat) {
        return seatMapper.update(seat);
    }

    @Override
    public List<Seat> find(Seat seat) {
        return  seatMapper.select(seat);
    }

    @Override
    public int count(Map<String, Object> map) {
        return seatMapper.selectCount(map);
    }

    @Override
    public List<Seat> query(Map<String, Object> map) {
        return seatMapper.selectByPage(map);
    }

}
